package com.wcarmon.life.command{

    import com.adobe.cairngorm.commands.ICommand
    import com.adobe.cairngorm.control.*;
	import com.wcarmon.life.business.*;
	import com.wcarmon.life.event.*;
	import com.wcarmon.life.model.*;
	import com.wcarmon.life.view.*;
	import flash.display.*;
	import mx.controls.Alert;
	import mx.core.*;
	import mx.managers.*;
	import mx.utils.ObjectUtil;
	
	
	
	public class ShowAttachFileCommand implements ICommand {
		include "../../includes/loggerSnippet.as";
		
		public function execute( event : CairngormEvent ) : void {
			var e:ShowAttachFileEvent = ShowAttachFileEvent(event);

			var model : LifeModelLocator = LifeModelLocator.getInstance();			
			var tmp :IFlexDisplayObject = PopUpManager.createPopUp(Application.application as DisplayObject, 
											AttachFile, true);
			model.attachFilePop = AttachFile( tmp );
			model.attachFilePop.block_id = e.block_id;	
			PopUpManager.centerPopUp( model.attachFilePop );
		}
	}
}